﻿@model OnlineStore.Models.Product

@{
    ViewBag.Title = "title";
    Layout = "_Layout";
}

<h2>商品详情</h2>

<div class="container mt-4">
    
    <h3>商品图片</h3>
    
    @foreach (var image in Model.ProductImages)
    {
        <img alt="" src="@image.Url"/>
    }
    
    <h3>商品评论</h3>
    @foreach (var comment in Model.Comments)
    {
        <div class="card mt-4">
            <div class="card-body">
                <div>
                    <span class="ml-4">评论用户：</span>@comment.User.Name
                </div>
                <p>@comment.Description</p>
                <div>
                    <span>评论的时间：</span> @comment.SubmitDate
                </div>
            </div>
        </div>
    }
</div>